package com.lagou.module.service;

import com.lagou.module.dao.ClassGradeDao;
import com.lagou.module.entity.ClassGrade;
import com.lagou.module.entity.PageBean;
import com.lagou.module.factory.DaoFactory;

import java.util.List;

public class ClassGradeServiceImpl implements ClassGradeService {

    //自定义成员变量
    private ClassGradeDao classGradeDao;

    public ClassGradeServiceImpl( ) {
        this.classGradeDao = DaoFactory.getClassGradeDao();
    }

    //show all classes
    @Override
    public List<ClassGrade> classGradeShowService(PageBean pageBean) {
        return classGradeDao.classGradeShow(pageBean);
    }

    @Override
    public int classGradeAddService(ClassGrade classGrade) {
        return classGradeDao.classGradeAdd(classGrade);
    }

    @Override
    public int classGradeDeleteService(String[] ids) {
        return classGradeDao.classGradeDelete(ids);
    }

    @Override
    public int classGradeModifyService(ClassGrade classGrade) {
        return classGradeDao.classGradeModify(classGrade);
    }

    @Override
    public ClassGrade classGradeFindService(int classId) {
        return classGradeDao.classGradeFind(classId);
    }
}
